﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DocumentItem>" %>

<%@ Import Namespace="SDT.Model" %>
<%@ Import Namespace="SDT.Lib.Common" %>
<%@ Import Namespace="SDT.Site.ViewModels" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Chi tiết về tài liệu | Thông tư liên tịch 83/2003/TTLT-BTC-BTN&amp;MT
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="sr_alnk">
        <span class="breadcrumbs pathway"><a href="/" class="pathway">Trang chủ</a>
            <img src="/Images/ftc/arrow.png" alt="" />
            <a href="/Document" class="pathway">Tài liệu</a>
            <img src="/Images/ftc/arrow.png" alt="" />
            <% if (Model.FormDocument != null && Model.FormDocument.DocumentCategory != null)
               { %>
            <a href="/Document/Category/<%= Model.FormDocument.DocumentCategory.ID %>" class="pathway">
                <%= Model.FormDocument.DocumentCategory.Name%></a>
            <%} %>
            <img src="/Images/ftc/arrow.png" alt="" />
            <%= string.IsNullOrEmpty(Model.FormDocument.FormName) ? "" : Model.FormDocument.FormName %></span>
    </div>
    <div class="col_q_l" id="col_r" style="border: 0px;">
        <% if (Model.FormDocument != null)
           { %>
        <div class="dm_doc" id="dm_details">
            <table cellspacing="0" summary="Thông tư liên tịch 80/2003/TTLT-BNN-BTC">
                <caption>
                    Chi tiết tài liệu: <em>&nbsp;<%= Model.FormDocument.FormName%></em></caption>
                <col id="prop">
                <col id="val">
                <thead>
                    <tr>
                        <td>
                            Thuộc tính
                        </td>
                        <td>
                            Giá trị
                        </td>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>
                            Tên tài liệu
                        </td>
                        <td>
                            <%= Model.FormDocument.FormName%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Mô tả
                        </td>
                        <td>
                            <p>
                                <%= Model.FormDocument.FormNote%></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Tên File
                        </td>
                        <td>
                            <%--<ul style="margin-left: 30px;">
                                <% if (Model.Documents != null && Model.Documents.Count() > 0)
                                   {
                                       foreach (Document doc in Model.Documents)
                                       {
                                %>
                                <li>
                                    <%= doc.Path %></li>
                                <%}
                                   } %>
                            </ul>--%>
                            <div style="margin-left: 20px; padding: 10px 0px 10px 0px;">
                                <ul>
                                    <% if (Model.Documents != null && Model.Documents.Count() > 0)
                                       {
                                           foreach (Document doc in Model.Documents)
                                           {
                                    %>
                                    <li style="list-style-type: none;"><a href="<%= Model.FileRootPath+ doc.ID+"/" + doc.Path %>"
                                                onclick="UpdateDowdload('<%= doc.ID %>')">
                                        <img src="<%= doc.Path.IsDocument("doc") ? "/Images/doc.png" : "/Images/pdf_16x16.png"%>"
                                            alt="file icon"></a>&nbsp;&nbsp; <a href="<%= Model.FileRootPath+ doc.ID+"/" + doc.Path %>"
                                                onclick="UpdateDowdload('<%= doc.ID %>')">
                                                <%= doc.Name%></a> ( Tải xuống:
                                        <%= doc.nDownload %>
                                        ) </li>
                                    <%}
                   }%>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Gửi ngày
                        </td>
                        <td>
                            <%= Model.FormDocument.AddDate%>
                        </td>
                    </tr>
                </tbody>
            </table>
            <div class="clr">
            </div>
        </div>
        
        <script src="../../Scripts/AjaxCommons.js" type="text/javascript"></script>
        <script type="text/javascript">
            function UpdateDowdload(id) {
                ApplyChangeYN("/AjaxData/UpdateDownload/" + id);
            }
        </script>

        <div class="clear">
        </div>
        <%--<div style="margin-left: 20px; padding: 10px 0px 10px 0px;">
            <ul>
                <% if (Model.Documents != null && Model.Documents.Count() > 0)
                   {
                       foreach (Document doc in Model.Documents)
                       {
                %>
                <li style="list-style-type: none;">
                    <img src="<%= doc.Path.IsDocument("doc") ? "/Images/doc.png" : "/Images/pdf_16x16.png"%>"
                        alt="file icon">&nbsp;&nbsp; <a href="<%= Model.FileRootPath+ doc.ID+"/" + doc.Path %>"
                            onclick="UpdateDowdload('<%= doc.ID %>')">
                            <%= doc.Name%></a> ( Tải xuống:
                    <%= doc.nDownload %>
                    ) </li>
                <%}
                       }%>
            </ul>
        </div>--%>
        <div class="clear">
        </div>
        <div class="dm_taskbar">
            <ul>
                <li><a href="javascript: history.go(-1);">Trở lại</a></li>
            </ul>
        </div>
        <%} %>
    </div>
    <div class="col_q_r" style="margin-top: 5px;">
        <div class="bannergroup">
            <img src="../../Images/ftc/banner-2.jpg" width="295" class="bor_img" />
        </div>
        <div class="bannergroup">
            <img src="../../Images/ftc/banner-.gif" width="295" class="bor_img" />
        </div>
        <div class="bannergroup">
            <img src="../../Images/ftc/banner-1.gif" width="295" class="bor_img" />
        </div>
    </div>
</asp:Content>
